package com.main.pojo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Transient;

import com.main.utils.Constant;

@Entity
@DiscriminatorValue("PHOTO")  
public class TrollPhoto extends Troll implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6536001327564854688L;
	
	private String photoType; // troll image/video
	private String url; // URL of image or video
	private int prevTrollId;
	private int nextTrollId;
	private String sexy;
	public TrollPhoto(){
		
	}
	
	public TrollPhoto(String title, String source, String photoType, String url){
		this.id = 0;
		this.title = title;
		this.source = source;
		this.photoType = photoType;
		this.url = url;
		this.viewNumber = 0;
		this.postDate = new Date();
		this.status = Constant.PENDING;
		prevTrollId = -1;
		nextTrollId = -1;
		sexy = Constant.NO;
	}
	
	@Column(name="PhotoType")
	public String getPhotoType() {
		return photoType;
	}
	public void setPhotoType(String photoType) {
		this.photoType = photoType;
	}
	
	@Column(name="Url")
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}

	@Transient
	public int getPrevTrollId() {
		return prevTrollId;
	}

	public void setPrevTrollId(int prevTrollId) {
		this.prevTrollId = prevTrollId;
	}

	@Transient
	public int getNextTrollId() {
		return nextTrollId;
	}

	public void setNextTrollId(int nextTrollId) {
		this.nextTrollId = nextTrollId;
	}

	@Column(name="Sexy")
	public String getSexy() {
		return sexy;
	}

	public void setSexy(String sexy) {
		this.sexy = sexy;
	}
		
	
}
